<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>公交查询</title>
		<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
		<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="css/all_css.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/base.css" />
		<link rel="stylesheet" type="text/css" href="lib/weui.css" />
		<link rel="stylesheet" type="text/css" href="css/weui/jquery-weui.css" />
		<link rel="stylesheet" type="text/css" href="css/loadingCss/fakeloader.css" />
		<style type="text/css">
			.pageCss {
				position: fixed;
				top: 150px;
				border: 5px solid;
			}
		</style>
	</head>

	<body ontouchstart>

		<div id="bus_main">
			<div class="fakeloader"></div>
		</div>

		<script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/weui/jquery-weui.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/loadingJs/fakeloader.min.js" type="text/javascript" charset="utf-8"></script>
		<!--<script src="js/bus1.js" type="text/javascript" charset="utf-8"></script>-->
		<script type="text/javascript">
			//			webSettings.setDomStorageEnable(true);

			$(function() {
				//进入页面显示加载中
				$(".fakeloader").fakeLoader({
					timeToHide: 1500,
					bgColor: "#9BA3F4",
					spinner: "spinner3"
				});
				setTimeout(function() {
					createWebview(); //创建新的Webview窗口
					getTitleNView();
				}, 1500);

			});

			// H5 plus事件处理
			function plusReady() {
				plus.key.addEventListener('backbutton', function() {
					nw && nw.isVisible() ? nw.hide('pop-out') : plus.runtime.quit();
				}, false);

			}
			if(window.plus) {
				plusReady();
			} else {
				document.addEventListener('plusready', plusReady, false);
				//				listChildren();
			}
			var nw = null;
			// 创建带原生子View控件的Webview窗口 
			function createWebview() {
				nw = nw || plus.webview.create('https://web.chelaile.net.cn/wwd/index?src=webapp_changchunshigongjiaochaxun', 'test', {
					'titleNView': {
						'backgroundColor': '#3498DB',
						'titleText': '公交查询',
						'titleSize': '21px',
						'titleColor': '#FFFFFF',
						'autoBackButton': true,
					},
					replacewebapi: {
						geolocation: 'alldevice'
					}
				});
				nw.addEventListener('close', function() {
					nw = null;
				}, false);
				nw.show('pop-in');
			}

			//			// 获取Webview窗口的标题栏控件对象
			//			function getTitleNView() {
			//				var nb = nw.getTitleNView();
			//				nb.drawText('返回', {
			//					'top': '0px',
			//					'left': '0px',
			//					'width': '96px',
			//					'height': '100%'
			//				});
			//				nw.show();
			//			}
		</script>
	</body>

</html>